const directive = {
  install(Vue) {
    Vue.directive("noMoreClick", {
      inserted(el, binding) {
        el.addEventListener("click", () => {
          el.classList.add("is-disabled");
          el.disabled = true;
          setTimeout(() => {
            el.disabled = false;
            el.classList.remove("is-disabled");
          }, binding.value || 2000);
        });
      },
    });
  },
};
export default directive